﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="~/Default.aspx.cs" Inherits="OCXS.OCXSAdministration._Default" %>

<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>

<asp:Content ID="Header_ContentPlaceHolder" runat="server" ContentPlaceHolderID="Header_ContentPlaceHolder">
<link rel="stylesheet" type="text/css" href="Styles/List.css" />
<link rel="stylesheet" type="text/css" href="Styles/Overlay.css" />
<script type="text/javascript" src="Scripts/Visualization.js"></script>
</asp:Content>

<asp:Content ID="TopBarSideMenu_TopBarSideMenu" runat="server" ContentPlaceHolderID="TopBarSideMenu_ContentPlaceHolder">
<div class="button">
	<span class="plain">My button</span>
</div>
<div class="button">
	<span class="plain">My button</span>
</div>
<div class="button">
	<span class="plain">My button</span>
</div>
</asp:Content>

<asp:Content ID="OverlayElements_Content" runat="server" ContentPlaceHolderID="OverlayElements_ContentPlaceHolder">
<div id="variable_tooltip"></div>
</asp:Content>

<asp:Content ID="Main_ContentPlaceHolder" runat="server" ContentPlaceHolderID="Main_ContentPlaceHolder">

<asp:ScriptManager runat="server" id="Main_ScriptManager" EnablePartialRendering="true"></asp:ScriptManager>

<asp:Timer ID="Variables_Timer" runat="server" Interval="10000" OnTick="Variables_Timer_Tick"></asp:Timer>
<asp:Timer ID="Subscriptions_Timer" runat="server" Interval="5000" OnTick="Subscriptions_Timer_Tick"></asp:Timer>
<asp:Timer ID="ServerStatus_Timer" runat="server" Interval="20000" OnTick="ServerStatus_Timer_Tick"></asp:Timer>

<div style="margin-bottom:10px"><span class="plain">This is a Lorem Ipsum text</span></div>
<div>
	<!-- Top tab -->
	<div>
		<div style="width:625px;clear:none;float:left">
			<div class="box" style="width:100%;min-height:350px">
				<div style="background-color:#dedec5;padding:5px 7px 5px 7px">
					<span class="boxtitle">
						Variables 
						<asp:UpdateProgress runat="server" id="Variables_UpdateProgress" AssociatedUpdatePanelID="Variables_UpdatePanel">
							<ProgressTemplate>
								(Working...)
							</ProgressTemplate>
						</asp:UpdateProgress>
					</span>
				</div>
				<div class="boxdivisor"></div>
				<div class="innerbox">
					<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="Variables_UpdatePanel">
						<Triggers>
                            <asp:AsyncPostBackTrigger ControlID="Variables_Timer" EventName="Tick" />
                        </Triggers>
                        <ContentTemplate>
						<div style="margin-bottom:10px">
							<span class="plain">OCXS server/service has correctly loaded the configuration 
							and is hosting the defined set of variables being generated acordingly to the 
							specified generation policies. In this tab, variables are showed and monitored 
							with a certain update rate.</span>
						</div>
						<div>
							<asp:GridView runat="server" ID="Variables_GridView" OnRowDataBound="Variables_GridView_RowDataBound" CssClass="grid" AutoGenerateColumns="false" Width="100%">
								<FooterStyle BackColor="White" ForeColor="#000066" />
								<HeaderStyle CssClass="gridheader" />
								<PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
								<RowStyle ForeColor="#000066" />
								<SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
								<SortedAscendingCellStyle BackColor="#F1F1F1" />
								<SortedAscendingHeaderStyle BackColor="#007DBB" />
								<SortedDescendingCellStyle BackColor="#CAC9C9" />
								<SortedDescendingHeaderStyle BackColor="#00547E" />
                                <Columns>
                                    <asp:TemplateField HeaderText="Variable ID">
                                        <ItemTemplate>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Latest values" ItemStyle-Width="250"></asp:TemplateField>
                                </Columns>
							</asp:GridView>
						</div>
						</ContentTemplate>
					</asp:UpdatePanel>
				</div>
			</div>
		</div>
		<!-- Side tab -->
		<div style="width:625px;clear:none;float:left;margin-left:10px">
			<div class="box" style="width:100%">
				<div style="background-color:#dedec5;padding:5px 7px 5px 7px">
					<span class="boxtitle">
						Subscriptions 
						<asp:UpdateProgress runat="server" 
                                id="Subscriptions_UpdateProgress" AssociatedUpdatePanelID="Subscriptions_UpdatePanel">
							<ProgressTemplate>
								(Working...)
							</ProgressTemplate>
						</asp:UpdateProgress>
					</span>
				</div>
				<div class="boxdivisor"></div>
				<div class="innerbox">
					<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="Subscriptions_UpdatePanel">
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="Subscriptions_Timer" EventName="Tick" />
                        </Triggers>
						<ContentTemplate>
						<div style="margin-bottom:10px">
							<span class="plain">Lorem ipsum</span>
						</div>
						<div>
                            <asp:Repeater ID="Subscriptions_Repeater" OnItemDataBound="Subscriptions_Repeater_ItemDataBound" runat="server">
                                <HeaderTemplate>
                                    <div class="subscriptionheader">
                                        <span>Subscription information</span>
                                    </div>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <div class="subscriptionentry">
                                        <div style="margin-bottom:5px">
                                            <span class="plain" style="font-weight:bold">
                                                Subscription ID:
                                            </span>
                                            <span class="plain">
                                                <asp:Literal ID="SID_Literal" runat="server"></asp:Literal>
                                            </span>
                                        </div>
                                        <div id="VariablesList_Div" runat="server"></div>
                                    </div>
                                </ItemTemplate>
                                <SeparatorTemplate>
                                    <div class="subscriptiondivisor"></div>
                                </SeparatorTemplate>
                            </asp:Repeater>
						</div>
						</ContentTemplate>
					</asp:UpdatePanel>
				</div>
			</div>
			<div class="box" style="width:100%">
				<div style="background-color:#dedec5;padding:5px 7px 5px 7px">
					<span class="boxtitle">
						Server status 
						<asp:UpdateProgress runat="server" 
                                id="ServerStatus_UpdateProgress" AssociatedUpdatePanelID="ServerStatus_UpdatePanel">
							<ProgressTemplate>
								(Working...)
							</ProgressTemplate>
						</asp:UpdateProgress>
					</span>
				</div>
				<div class="boxdivisor"></div>
				<div class="innerbox">
					<asp:UpdatePanel runat="server" ID="ServerStatus_UpdatePanel">
						<Triggers>
                            <asp:AsyncPostBackTrigger ControlID="ServerStatus_Timer" EventName="Tick" />
                        </Triggers>
                        <ContentTemplate>
						<div style="margin-bottom:10px">
							<span class="plain">Lorem ipsum</span>
						</div>
						<div>
							<div><span class="bold">&#35; Variables:</span> 
                            <span class="plain"><asp:Literal ID="SSVarNum_Literal" runat="server"></asp:Literal></span></div>
                            <div class="greydivisor"></div>
                            <div><span class="bold">&#35; Subscriptions:</span> 
                            <span class="plain"><asp:Literal ID="SSSubNum_Literal" runat="server"></asp:Literal></span></div>
                            <div class="greydivisor"></div>
                            <div><span class="bold">&#35; Generating threads:</span> 
                            <span class="plain"><asp:Literal ID="SSGenTNum_Literal" runat="server"></asp:Literal></span></div>
                            <div class="greydivisor"></div>
                            <div><span class="bold">&#35; Subscription watcher threads:</span> 
                            <span class="plain"><asp:Literal ID="SSSubWTNum_Literal" runat="server"></asp:Literal></span></div>
                            <div class="greydivisor"></div>
                            <div><span class="bold">Garbage Collector total memory:</span> 
                            <span class="plain"><asp:Literal ID="SSGCTotMem_Literal" runat="server"></asp:Literal></span></div>
                            <div class="greydivisor"></div>
                            <div><span class="bold">Garbage Collector collection number:</span> 
                            <span class="plain"><asp:Literal ID="SSGCCollNum_Literal" runat="server"></asp:Literal></span></div>
						</div>
						</ContentTemplate>
					</asp:UpdatePanel>
				</div>
			</div>
		</div>
	</div>
	<!-- Bottom tab -->
	<div style="width:1260px;margin-bottom:10px">
		<div class="box" style="width:100%">
			<div style="background-color:#dedec5;padding:5px 7px 5px 7px">
				<span class="boxtitle">
					Server status 
					<asp:UpdateProgress runat="server" id="ServerLog_UpdateProgress" AssociatedUpdatePanelID="ServerLog_UpdatePanel">
						<ProgressTemplate>
							(Working...)
						</ProgressTemplate>
					</asp:UpdateProgress>
				</span>
			</div>
			<div class="boxdivisor"></div>
			<div class="innerbox">
				<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="ServerLog_UpdatePanel">
					<ContentTemplate>
					<div style="margin-bottom:10px">
						<span class="plain">OCXS server/service is working. Latest logs and activities are showed in this pane. 
						To see the complete actovity/log data, you can check the log files in the server.</span>
					</div>
					<div>
						Other
					</div>
					</ContentTemplate>
				</asp:UpdatePanel>
			</div>
		</div>
	</div>
</div>
<div class="blankdivisor" style="height:10px"></div>
<div><span class="plain">Another text</span></div>
</asp:Content>
